package com.hrs.core.mapper;

import com.hrs.enity.db.Achieve;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hrs.enity.dto.AchieveViewDto;
import com.hrs.enity.vo.DepartmentIdVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
* @author 纱雾休比酱
* @description 针对表【t_achieve(档案表)】的数据库操作Mapper
* @createDate 2022-12-05 23:04:48
* @Entity com.hrs.enity.db.Achieve
*/
@Mapper
public interface AchieveMapper extends BaseMapper<Achieve> {

    /**
     * 获取机构编号
     * @param id
     * @return
     */
    DepartmentIdVo getIds(@Param("id") Integer id);

    /**
     * 根据id获取一条档案详情
     * @param id
     * @return
     */
    AchieveViewDto get(@Param("id") Long id);

    Integer countByDepartmentId(@Param("deptId") Integer deptId);

    Integer countByPositionId(@Param("pId") Integer pId);

    List<AchieveViewDto> pageAchieve(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize,
                                     @Param("dIds") List<Integer> dIds,@Param("pIds") List<Integer> pIds,
                                     @Param("begin") Date begin,@Param("end") Date end,
                                     @Param("status") Integer status);

    Long totalPage(@Param("dIds") List<Integer> dIds,@Param("pIds") List<Integer> pIds, @Param("begin") Date begin,
                   @Param("end") Date end, @Param("status") Integer status);

    Achieve countBySalaryScaleId(@Param("sId") Long sId);
}




